﻿using System.Runtime.InteropServices;

namespace XLua.LuaDLL
{
    public partial class Lua
    {
        [DllImport(LUADLL, CallingConvention = CallingConvention.Cdecl)]
#if UNITY_IPHONE
        public static extern int cxx_luaopen_rapidjson(System.IntPtr L);

        public static int luaopen_rapidjson(System.IntPtr L)
        {
            return cxx_luaopen_rapidjson(L);
        }
#else
		 public static extern int luaopen_rapidjson(System.IntPtr L);
#endif
        
        [DllImport(LUADLL, CallingConvention = CallingConvention.Cdecl)]
#if UNITY_IPHONE
        public static extern int cxx_luaopen_md5(System.IntPtr L);

        public static int luaopen_md5(System.IntPtr L)
        {
            return cxx_luaopen_md5(L);
        }
#else
		 public static extern int luaopen_md5(System.IntPtr L);
#endif
        

        [MonoPInvokeCallback(typeof(LuaDLL.lua_CSFunction))]
        public static int LoadRapidJson(System.IntPtr L)
        {
            return luaopen_rapidjson(L);
        }

        [MonoPInvokeCallback(typeof(LuaDLL.lua_CSFunction))]
        public static int LoadMD5(System.IntPtr L)
        {
            return luaopen_md5(L);
        }

//#if UNITY_IOS
//        [DllImport("__Internal")]
//        public static extern object CallAppleStaticMathod(string className, string methodName, string argsJsonString);

//        [DllImport("__Internal")]
//        public static extern bool IsExistAppleStaticMethod(string className, string methodName);
//#endif
    }
}
